package com.qdlc.p2p.dal.model;

import com.qdlc.p2p.dal.dto.AdditionalMovieTicket;
import org.springframework.beans.BeanUtils;

/**
 * Created on 2016/1/21.
 */
public class AdditionalMovieTicketModel extends AdditionalMovieTicket {

    //用户名
    private String userName;
    //搜索框输入字符串
    private String searchName;
    //当前页
    private int page;
    //每页记录数
    private int rows;

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getSearchName() {
        return searchName;
    }

    public void setSearchName(String searchName) {
        this.searchName = searchName;
    }

    public int getPage() {
        return page;
    }

    public void setPage(int page) {
        this.page = page;
    }

    public int getRows() {
        return rows;
    }

    public void setRows(int rows) {
        this.rows = rows;
    }

    /**
     * 实例化
     * @param ticket
     * @return
     */
    public static AdditionalMovieTicketModel instance(AdditionalMovieTicket ticket) {
        AdditionalMovieTicketModel model = new AdditionalMovieTicketModel();
        BeanUtils.copyProperties(ticket, model);
        return model;
    }
}
